package com.sgcc.system.api;

import com.sgcc.common.core.constant.ServiceNameConstants;
import com.sgcc.common.core.domain.R;
import com.sgcc.system.api.domain.SysRoleDept;
import com.sgcc.system.api.factory.RemoteRoleDeptFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 用户服务
 * 
 * @author sgcc
 */
@FeignClient(contextId = "remoteRoleDeptService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteRoleDeptFallbackFactory.class)
public interface RemoteRoleDeptService
{
    @GetMapping(value = "/roleDept/{id}")
    public R<SysRoleDept> getInfo(@PathVariable("id") String id);

    @PostMapping(value = "/roleDept")
    public R<Integer> add(@RequestBody SysRoleDept sysRoleDept);

    @PutMapping(value = "/roleDept")
    public R<Integer> edit(@RequestBody SysRoleDept sysRoleDept);

    @PostMapping(value = "/roleDept/findDeptRole")
    public R<SysRoleDept> findDeptRole(@RequestBody SysRoleDept post);
}
